xen/hvm: Fix advertisement of available xstates following c/s c52319642
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 10 Jun 2016 18:11:12 +0000 (19:11 +0100)
committerWei Liu <wei.liu2@citrix.com>
Mon, 13 Jun 2016 10:39:14 +0000 (11:39 +0100)
commit96a745cc270060712f9ea86c5f909ef443be0309
tree4f9001b60eb2b8c38bb51f1eb32da120bfd8b3c1
parent937324f032f4f77866e80e39de0d697fa5131df1
xen/hvm: Fix advertisement of available xstates following c/s c52319642

PKU lives in CPUID.7[0].ECX, not EBX.  This causes hardware with BMI1 to
accidentally advertise PKU in CPUID.0xD[0].EAX.  Any OS which proceeds to
blindly write this into %xcr0 takes a #GP fault.  (Experimentally, Windows
Vista 32bit falls into this category.)

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/hvm/hvm.c